package ee.maoinvest.backend.model.dao;

import java.util.List;

import ee.maoinvest.backend.model.data.ElectricityMeterAndItsElectricityContractPeriod;

public interface ElectricityMeterAndItsElectricityContractPeriodDAO 
{
	//basic CRUD
	
	public int insertElectricityMeterAndItsElectricityContractPeriod(
			ElectricityMeterAndItsElectricityContractPeriod electricityMeterAndItsElectricityContractPeriod);
	
	public ElectricityMeterAndItsElectricityContractPeriod getElectricityMeterAndItsElectricityContractPeriodByID(
			int electricityMeterAndItsElectricityContractPeriodID);
	public List<ElectricityMeterAndItsElectricityContractPeriod> getAllElectricityMetersAndTheirElectricityContractPeriods();
	public int updateElectricityMeterAndItsElectricityContractPeriod(
			ElectricityMeterAndItsElectricityContractPeriod updatedElectricityMeterAndItsElectricityContractPeriod);
	/*
	 public int deleteElectricityMeterAndItsElectricityContractPeriod(
			int electricityMeterAndItsElectricityContractPeriodID);
	*/
	public String getEnterpriseNameMeterIsHavingContractWith(int electricityMeterID);
	public String getContractNameMadeOnMeter(int electricityMeterID);
	public List<ElectricityMeterAndItsElectricityContractPeriod> getAllEnterpriseContractsWithElectricityMetersByEnterpriseID(int enterpriseID);
	public List<ElectricityMeterAndItsElectricityContractPeriod> getAllElectricityMeterAndItsElectricityContractPeriodRelationsByContractID(int electricityContractID);
	public ElectricityMeterAndItsElectricityContractPeriod getElectricityMeterAndItsElectricityContractPeriodObjectByMeterIDAndContractPeriodEndDateIsNull(
			int electricityMeterID);
	public ElectricityMeterAndItsElectricityContractPeriod getDefaultEnterpriseElectricityMeterAndItsElectricityContractPeriodObjectByMeterIDAndContractPeriodEndDateIsNull(
			int electricityMeterID);
	
	public List<ElectricityMeterAndItsElectricityContractPeriod> getlistOfElectricityMetersAndTheirElectricityContractPeriodBetweenRegularReadingsGiven(
			int minRegularReadingID, int maxRegularReadingID);
	/*
	public List<ElectricityMeterAndItsElectricityContractPeriod> getAllEnterpriseRelationsWithElectricityMetersAndContractsBetweenGivenRegularReadingIDs(
			int enterpriseID, int minRegularReadingID, int maxRegularReadingID);
	*/
	public List<ElectricityMeterAndItsElectricityContractPeriod> getListOfAllEnterpriseRelationsWithSubstationMainElectricityMetersAndContractsBetweenGivenRegularReadingIDs(
			int enterpriseID, int minRegularReadingID, int maxRegularReadingID);
	
	public List<ElectricityMeterAndItsElectricityContractPeriod> getListOfEnterpriseContractPeriodsWithElectricityMetersBetweenRegularReadingsGiven(
			int enterpriseID, int minRegularReadingID, int maxRegularReadingID);
	public List<ElectricityMeterAndItsElectricityContractPeriod> getListOfEnterpriseContractPeriodsWithElectricityMetersBetweenRegularReadingsGivenByElectricityMeterID(
			int electricityMeterID, int minRegularReadingID, int maxRegularReadingID);
	
	public List<ElectricityMeterAndItsElectricityContractPeriod> getAllContractPeriodsThatAreNotEndedYetBySpecificElectricityContractID(
			int electricityContractID);
}
